package logic;

import environment.EnvironmentXMLReader;
import es.deusto.ingenieria.is.formulation.State;
import es.deusto.ingenieria.is.search.SearchMethod;
import es.deusto.ingenieria.is.search.blind.BreadthFS;

public class MainProgram {

	public static void main(String[] args) {
		try {
			IndyProblem problem = new IndyProblem();
			State initialState = new State(new EnvironmentXMLReader(
					"data/treasureadventure-1.xml").getInformation());
			problem.addInitialState(initialState);

			SearchMethod search = BreadthFS.getInstance();
			problem.solve(search);

		} catch (Exception ex) {
			System.err.println("% [MainProgram] Error: " + ex.getMessage());
			ex.printStackTrace();
		}
	}
}
